package cn.sheep.dmp.beans

/**
  * Sheep.Old @ 64341393
  * Created 2018/3/28
  */
class SheepString(val str: String) {

    def toIntPlus: Int = {
        try {
            str.toInt
        } catch {
            case _: Exception => 0
        }
    }


    def toDoublePlus: Double = {
        try {
            str.toDouble
        } catch {
            case _: Exception => 0
        }
    }
}


object SheepString{

    implicit def str2SheepString(str: String): SheepString = new SheepString(str)
}
